<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <include file="Public:resource"/>
    <title>缴费查询</title>
</head>
<body>
<div class="container">
    <include file="Public:top" title="缴费查询"/>
    <form id="searchForm">
        <div class="row" align="left" style="margin-top: 10px;">
            <div class="col-xs-3 col-md-3 col-sm-3 col-lg-3 align-to-input medium">
                水费账号
            </div>
            <div class="col-xs-9 col-md-9 col-sm-9 col-lg-9">
                <input type="text" name="userid" id="userid" placeholder="请输入水费账号">
            </div>
        </div>
        <div class="row" align="left" style="margin-top: 10px;">
            <div class="col-xs-3 col-md-3 col-sm-3 col-lg-3 align-to-input medium">
                年份
            </div>
            <div class="col-xs-9 col-md-9 col-sm-9 col-lg-9">
                <select name="year" id="year" class="select">
                    <script>
                        var years = getLatestYears(3);
                        $.each(years, function (index, item) {
                            writeOption(item, item + "年");
                        })
                    </script>
                </select>
            </div>
        </div>
    </form>
    <div class="row" style="margin-top: 20px;">
        <div class="col-xs-12 col-sm-12 col-mg-12 col-md-12">
            <div><input type="button" class="btn btn-lg btn-block jss-button"
                        onclick="onSearch() " value="查询"/>
            </div>
        </div>
    </div>
</div>
<script>
    function onSearch() {
        if ($("#userid").val() == '') {
            alert("请输入用户水费账号!");
            return;
        }
        var param = $("#searchForm").serialize();
        window.location.href = "{:U('feeSearchResult')}&" + param;
    }
</script>
</body>
</html>